# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-aresponses
pkgver=2.1.6
pkgrel=2
pkgdesc="Asyncio http mocking. Similar to the responses library used for 'requests'"
url="https://github.com/circleup/aresponses"
license=('MIT')
arch=('any')
depends=('python-aiohttp' 'python-pytest-asyncio')
makedepends=('python-setuptools')
checkdepends=('python-pytest-cov')
source=("https://github.com/circleup/aresponses/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('9fffe4a0a5f1dccbe8743c9d6df765accd36eefff964319d9d31b8f5eb93647b0ad142ec870e47a8d59d66a94c167a5f53851029cf962dba38e7813ad9d23a48')

build() {
  cd aresponses-$pkgver
  python setup.py build
}

check() {
  cd aresponses-$pkgver
  python -m pytest
}

package() {
  cd aresponses-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
